<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Статистика игр</title>
<style>
    table {
        width: 100%;
        border-collapse: collapse;
    }
    th, td {
        border: 1px solid black;
        padding: 8px;
        text-align: left;
    }
</style>
</head>
<body>
<table>
    <thead>
        <tr>
            <th>ID игры</th>
            <th>Имя игрока</th>
            <th>Выбор игрока</th>
            <th>Выбор бота</th>
            <th>Результат</th>
            <th>Дата</th>
        </tr>
    </thead>
    <tbody>
        @foreach($results as $result)
        <tr>
            <td>{{ $result->id }}</td>
            <td>{{ $playerName }}</td>
            <td>{{ $result->player_choice }}</td>
            <td>{{ $result->bot_choice }}</td>
            <td>{{ $result->result }}</td>
            <td>{{ $result->created_at }}</td>
        </tr>
        @endforeach
    </tbody>
</table>
<div>
            {{ $results->links() }}
        </div>
<nav>
    <li><a href="{{ route('main.index') }}">Back</a></li>
</nav>
</body>
</html>

